package com.example.demo.alex.controller;

import com.example.demo.alex.model.User;
import com.example.demo.alex.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping(value = "/getUser")
    public List<User> getUser(int pageSize,int pageNum){
     return  userService.getUserList(pageSize,pageNum);
    }

}
